Respect shr-max-image-proportion when rendering elfeed-entry#521
Respect shr-max-image-proportion when rendering elfeed-entry#521Feyorsh wants to merge 1 commit intoskeeto:masterfrom
shr-max-image-proportion when rendering elfeed-entry#521Conversation
shr can't respect `shr-max-image-proportion` because it isn't rendered in a window; call `elfeed-search-show-entry` first to fix this. See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71913 Co-authored-by: Jim Porter <jporterbugs@gmail.com>
Emacs 31, actually, though I don't have any particular opposition to making the change in 30 too. (The code has just diverged somewhat between 30 and 31, to fix some issues with zooming images, so I'd need to write a different patch for 30.) As for the patch, I haven't tried it myself, but from inspection it should do the right thing. Swapping the order around here shouldn't cause any problems I think: so long as there's no redisplay between the two steps (there shouldn't be), everything will be ok and there won't be anything like a flash of unrendered content. |
|
As per the mailing list mentioned, until the updates get pushed out it seems the way to get elfeed to respect (setq shr-ignore-cache t)Let me know if I'm mistaken. |
Personally, I'd just advise the function with the new implementation here. Then you can still use the image cache. |
I noticed that Elfeed would sometimes refuse to scale down images that were too large to be displayed in a given window; after some discussion on the mailing list, I realized this is because Elfeed renders before displaying a buffer, where it can't glean any information about window size (because there's no window).
Note that there is still an issue with SVG images not respecting
shr-max-image-proportion, but that has been fixed in Emacs 30 thanks to @jimporter; that's not Elfeed's problem to fix.